package com.guoguo.tangyan.dao;

import com.guoguo.tangyan.entity.Order;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OrderDao {
    @Select("select id,cate,mansion,tower,site,consignee,delivery_period,provider,mobile from `ty_order`")
    @Results({
            @Result(property = "deliveryPeriod", column = "delivery_period")
    })
    List<Order> getOrderList();

    @Select("select id,cate,mansion,tower,site,consignee,delivery_period,provider,mobile from `ty_order` where id>#{value} limit 1")
    @Results({
            @Result(property = "deliveryPeriod", column = "delivery_period")
    })
    Order getOrder(Long id);
}
